package Basic.day05;

import java.util.Random;

public class ArrayDemo {
    public static void main(String[] args) {
        int[] arr = new int[10];
        for (int i = 0; i < arr.length; i++){
            arr[i] = i + 1;
            System.out.print(arr[i] + " ");
        }
        System.out.println("-------------");
        // 创建一个长度为10的数组, 并随机赋值0-99之间的随机整数
        int[] arr1 = new int[10];
        Random random = new Random();
        for (int i = 0; i < arr1.length; i++){
            arr1[i] = random.nextInt(100);
            System.out.print(arr1[i] + " ");
        }

    }
}
